package itheima.controller;

import itheima.pojo.Clazz;
import itheima.pojo.Result;
import itheima.service.ClazzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ClazzController {

    private ClazzService clazzService;
    @GetMapping("/clazzs")

    public Result list(){
        List<Clazz> list=clazzService.addAll();
        return Result.success(list);
    }

}
